<?php
session_start();
require_once "../includes/objects/user.php";

if (isset($_POST['is_ajax']) && $_POST['is_ajax']) {
	$email=$_POST['email'];
	$pass=$_POST['pass'];
	$encripted=sha1(md5($pass));
	if (User::isUser($email, $encripted)) {
		$usuario=new User();
		if($usuario->loadUser($email)){
			$_SESSION['usuario']=serialize($usuario);
			echo "success";
		}
	}
}
usleep($_POST['max_sleep']);
?>